#!C:\strawberry\perl\bin\perl.exe

use XML::RPC; 
use Data::Dumper; 
use constant XMLRPC =>  'http://localhost:8080/exist/xmlrpc'; 

my $teclado = <STDIN>;
chop( $teclado );

my $server = XML::RPC->new(XMLRPC); 
my $result = $server->call("describeCollection", "/db" ); 
print Dumper $result; 
$result = $server->call("createCollection", "/db/prueba"); 
$result = $server->call("describeCollection", "/db/prueba" ); 
print Dumper $result;
my $xml=<<EOC; 
<datos> 
<cosa> $teclado </cosa> 
</datos> 
EOC

$result = $server->call("parse", $xml,  "/db/prueba/datos" ); 
print Dumper $result;